package cn.script.game.dup;

import cn.script.call_api.AfterApi;
import cn.script.call_api.BeforeApi;
import cn.script.game.GameOpt;

/**
 * 操作顶层类
 *
 * @author 周永波
 */
public abstract class AbstractOpt {

    protected String optName;

    protected GameOpt go;

    protected BeforeApi before;

    protected AfterApi after;

    public AbstractOpt(String optName, GameOpt go) {
        this.optName = optName;
        this.go = go;
    }

    public void init() {
        this.before = this.beFore();
        this.after = this.after();
    }

    protected abstract BeforeApi beFore();

    protected abstract AfterApi after();

    public abstract void launch();
}
